<!DOCTYPE html>
<html>

<head lang="en">
    <meta charset="UTF-8">
    <title>完善当当购物车页面</title>
    <link type="text/css" rel="stylesheet" href="../css/shopping.css" />
</head>

<body>

    <div class="content">
        <div class="logo">
            <img src="../img/logo.jpg"><span onclick="close_plan();">关闭</span>
        </div>
        <div class="cartList">
            <ul>
                <li>
                    <p onclick="collection();">移入收藏</p>
                    <p onclick="del();">删除</p>
                </li>
                <li id="price0">¥159.00</li>
                <li><input type="button" name="minus" value="-" onclick="minus(0);"><input type="text" name="amount"
                        value="1"><input type="button" name="plus" value="+" onclick="plus(0);"></li>
                <li>¥<input type="text" name="price" value="159.00"></li>

            </ul>
            <ul>
                <li>
                    <p onclick="collection();">移入收藏</p>
                    <p onclick="del();">删除</p>
                </li>
                <li id="price1">¥159.00</li>
                <li><input type="button" name="minus" value="-" onclick="minus(1);"><input type="text" name="amount"
                        value="1"><input type="button" name="plus" value="+" onclick="plus(1);"></li>
                <li>¥<input type="text" name="price" value="159.00"></li>


            </ul>
            <ol>
                <li id="totalPrice">&nbsp;</li>
                <li><span onclick="accounts();">结 算</span></li>
            </ol>
        </div>
    </div>

    <script>
        function plus(num){
            let jg=document.getElementsByName("price");
            [num].values;
            
        }

        function minus(num){
            let jg=document.getElementsByName("price");
            [num].values;
            let count=parseInt(document.getElementsByName("amount")[num].value)


        }
    </script>
</body>

</html>